package com.lago.homework2.exercise1;

//调用scanner进行参数输入
import java.util.Scanner;

public class PrintArrayTest {
    public static void main(String[] args){
        PrintArray array = new PrintArray();
        while (true) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入二维数组行：");
            int cols = sc.nextInt();
            System.out.println("请输入二维数组列：");
            int row = sc.nextInt();
            System.out.println("请输入设置的整数：");
            int value = sc.nextInt();
            array.setArray(cols-1, row-1, value);
            array.show();       //打印16x16的数组
            array.colsSum();    //所有行的和
            array.rowsSum();    //所有列的和
            array.toRightSum(); //左上到右下的和
            array.toLeftSum();  //右上到左下的和

        }
    }
}
